const path = require("path");
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
    transpileDependencies: true,
    configureWebpack: {
        resolve: {
            alias: {
                "@": path.join(__dirname, "src"),
            },
        },
    },
    devServer: {
        port: 8081, // 开发默认启动端口
        proxy: {
            // "/api": {
            //     target: "http://localhost:3001", // 目标服务器地址
            //     changeOrigin: true,
            //     pathRewrite: {
            //         "^/api": "",
            //     },
            // },
            "/amap": {
                target: "http://webapi.amap.com/ui/1.0",
                changeOrigin: true,
                ws: true,
                pathRewrite: {
                    "^/amap": "",
                },
            },
        },
    },
});
